package com.coincalf.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户财产记录
 * </p>
 *
 * @author qiang
 * @since 2018-04-17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class AccountDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 自增id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 币种id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long coinId;

    /**
     * 账号状态：1，正常；2，冻结；
     */
    private Integer accountStatus;

    /**
     * 币种可用金额
     */
    private BigDecimal balanceAmount;

    /**
     * 账面余额
     */
    private BigDecimal carryingAmount;

    /**
     * 币种冻结金额
     */
    private BigDecimal freezeAmount;

    /**
     * 累计充值金额
     */
    private BigDecimal rechargeAmount;

    /**
     * 累计提现金额
     */
    private BigDecimal withdrawalsAmount;

    /**
     * 净值
     */
    private BigDecimal netValue;

    /**
     * 占用保证金
     */
    private BigDecimal lockMargin;

    /**
     * 持仓盈亏/浮动盈亏
     */
    private BigDecimal floatProfit;

    /**
     * 总盈亏
     */
    private BigDecimal totalProfit;

    /**
     * 充值地址
     */
    private String recAddr;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 持仓盈亏汇总
     */
    private BigDecimal opsitionGainAndLossSummary;

    /**
     * 币种类型
     */
    private String coinType;

    /**
     * 币种名称
     */
    private String coinName;

    /**
     * 币种img
     */
    private String coinImgUrl;

    /**
     * 剩余币的个数
     */
    private BigDecimal coinNum;

    /**
     * 总的币个数
     */
    private BigDecimal totalNum;

    /**
     * 币种冻结金额
     */
    private BigDecimal coinFreezeNum;

    /**
     * 提币手续费率
     */
    private BigDecimal feeRate;

    /**
     * 提币固定手续费
     */
    private BigDecimal minFeeNum;

    /**
     * 提现开关
     */
    private int withdrawFlag;

    /**
     * 充值开关
     */
    private int rechargeFlag;

    /**
     * 单个币种CNY
     */
    private BigDecimal totalCny;

    /**
     * 当前对标基础结算货币价格
     */
    private BigDecimal currentPrice;

    private BigDecimal totalUsdt;
}
